'''
Description :
Author      : aigcst
Copyright   : CSTOS
Date        : 2025-06-13 22:41:19
LastEditors : aigcst
LastEditTime: 2025-06-18 22:25:34
Modified    :
'''

import flet as ft


def main(page: ft.Page):
    page.title = "CSTOS"
    # 初始化计数器的值
    count = ft.Text(value="0", size=30)

    def increment(_):
        count.value = str(int(count.value) + 1)
        page.update()

    button = ft.ElevatedButton(text="加一", on_click=increment)
    page.add(count)
    page.add(button)


ft.app(target=main, view=ft.AppView.WEB_BROWSER, port=80)
